/*************************************************************************
 * File Name:    Search_in_Rotated_Sorted_Array_II.cc
 * Author:       zero91
 * Mail:         jianzhang9102@gmail.com
 * Created Time: 2013/11/8 0:55:57
 * 
 * Description:  
 |------------------------------------------------------------------------
 | Problem: Search in Rotated Sorted Array II
 |
 | Follow up for "Search in Rotated Sorted Array":
 | What if duplicates are allowed?
 |
 | Would this affect the run-time complexity? How and why?
 |
 | Write a function to determine if a given target is in the array.
 |------------------------------------------------------------------------
 ************************************************************************/

#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <functional>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>

using namespace std;

class Solution {
public:
    bool search(int A[], int n, int target)
    {
        for (int i = 0; i < n; ++i) {
            if (A[i] == target) return true;
        }
        return false;
    }
};

